package com.itheima.d1_create_thread;

import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;

public class ThreadTest3 {
    public static void main(String[] args)throws Exception {
        Callable<String> call = new MyCallabele(100);

        FutureTask<String> f1 =new FutureTask<>(call);

        new Thread(f1).start();
        String rs = f1.get();
        System.out.println(rs);
    }
}
